package com.randi.common.core.domain.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author ziye
 */
@Data
public class TreeNode implements Serializable {

    @JsonIgnore
    protected Long id;

    @JsonIgnore
    protected Long parentId;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    protected List<TreeNode> children = new ArrayList<>();

}
